﻿@using CodeGenerator.Models.TemplateModels
@inherits RazorEngine.Templating.TemplateBase<CodeGenerator.Models.TemplateModels.ServiceFileModel>
using AutoMapper;
using Enterprise.Application.@(Model.DirName).Dto;
using Enterprise.Entities.@(Model.DirName);

namespace  Enterprise.Application.@Model.DirName
{

    /// <summary>
    /// 配置@(Model.CnName)的AutoMapper
    ///</summary>
    internal static class @(Model.Name)Mapper
    {
        public static void CreateMappings(IMapperConfigurationExpression configuration)
        {
            configuration.CreateMap <@(Model.Name),@(Model.Name)ListDto>();
            configuration.CreateMap <@(Model.Name)ListDto,@(Model.Name)>();
            configuration.CreateMap <@(Model.Name)EditDto,@(Model.Name)>();
            configuration.CreateMap <@(Model.Name),@(Model.Name)EditDto>();
        }
    }
}
